﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IDAL
{
    public interface IShareDAL
    {
        /// <summary>
        /// 根据shareId判断分享是否存在
        /// </summary>
        bool shareExistByShareId(int shareId);

        /// <summary>
        /// 根据photoId判断分享是否存在
        /// </summary>
        bool shareExistByPhotoId(int photoId);

        /// <summary>
        /// 添加分享
        /// </summary>
        bool Addshare(Model.Share share);

        /// <summary>
        /// 更新分享
        /// </summary>
        bool updateShare(Model.Share share);

        /// <summary>
        /// 根据shareId删除分享
        /// </summary>
        bool deleteShareByShareId(int shareId);

        /// <summary>
        /// 根据photoId删除分享
        /// </summary>
        bool deleteShareByPhotoId(int photoId);

        /// <summary>
        /// 获取share对象
        /// </summary>
        Model.Share getModel(int shareId);

        /// <summary>
        /// 根据userId获取所有分享对象
        /// </summary>
        List<Model.Share> getModelByUserId(int userId);

        /// <summary>
        /// 根据photoId获取所有分享对象
        /// </summary>
        List<Model.Share> getModelByPhotoId(int photoId);
    }
}
